|
|
|
|
|
|
|
By now, you are familiar with what a control is and how controls are used in a Visual Basic program. A great way to learn more about Visual Basic is to explore each of the available controls. Controls are discussed in almost every chapter in this book. The next three chapters focus on how to use specific controls. |
|
|
|
|
|
|
|
|
In this chapter, you learn about the controls that are included by default with a new Visual Basic project. While there are very many controls that you can add to your projectsincluding controls provided by Microsoft as well as third-party companiesthe controls discussed here are always available to use with no extra effort on your part. |
|
|
|
|
|
|
|
|
Introduction to the Intrinsic Controls |
|
|
|
|
|
|
|
|
Visual Basic comes with controls that let you perform many types of programming tasks. Some of these controls appear in the Toolbox automatically when you start Visual Basic. These standard controls are called the intrinsic controls. These controls, pictured in Figure 4.1, include some very general controls likely to be used by almost every VB programmer. They are summarized in Table 4.1. |
|
|
|
|
|
|
|
|
Figure 4.1
The Toolbox contains tools that
represent Visual Basic's intrinsic controls. |
|
|
|
|
| Table 4.1 Controls Contained in Visual Basic's Toolbox | | Control Name | Function | | PictureBox | Displays graphics. Can also serve as a container for other controls. | | Label | Displays text that the users cannot edit. | | TextBox | Displays text. Allows the users to enter and edit the text. | | Frame | Serves as a container for other controls. Provides grouping of controls. | | CommandButton | Allows the users to initiate actions by clicking the button. |
|
|
|
|
|
|
(table continued on next page) |
|
|
|
|
|